class Person:
    # 定义对象方法 - eat
    def eat(self):
        # 在对象方法中设置对象属性
        self.name = '付永康'

    def fn1(self):
        self.name = '朱梓鑫'

    # def fn2(self):
        # del self.name

    def fn3(self):
        print(self.name)



# 创建对象
p1 = Person()
p1.eat()
# 访问属性
print(p1.name)

p1.fn1()
print(p1.name)

# p1.fn2()
# print(p1.name)

p1.fn3()
